import { _decorator, Component, Node, tween, v3 } from 'cc';
import { ZTool } from '../AshFramework/Utils/ZTool';
const { ccclass, property } = _decorator;

@ccclass('YD')
export class YD extends Component {

    speed: number = 0;
    dis: number = 2000;

    protected start(): void {
        let scale = ZTool.GetRandom(1.2, 2);
        this.node.scale = v3(scale, scale, scale);
        tween(this.node)
            .by(this.dis / this.speed, { position: v3(this.dis) })
            .start();
    }
}


